package com.example.xiaoshuo_yudu.service;

import com.example.xiaoshuo_yudu.entity.dto.BookmarkDto;
import com.example.xiaoshuo_yudu.entity.entity.Bookshelf;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户书架表 服务类
 * </p>
 *
 * @author xusen
 * @since 2025-07-31
 */
@Service
public interface BookshelfService extends IService<Bookshelf> {
    /**
     * 添加到书架
     * @param userId
     * @param request
     */
    String addBookmark(Long userId, BookmarkDto request);

    /**
     * 获取书架
     * @param userId
     * @return
     */
    List<Map<String, Object>> getBookshelf(Long userId);

    /**
     * 获取最近阅读
     * @param userId
     * @return
     */
    List<Map<String, Object>> getBookreading(Long userId);

    /**
     * 删除书架
     * @param ids
     * @param userId
     * @return
     */
    boolean deleteBooks(List<Long> ids, Long userId);

    boolean deleteReadingBooks(List<Long> ids, Long userId);

}
